package com.prs.crm.domain.stock;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.sys.FieldUI;

/**
 * 产品分类自定义属性
 * @author prs.chenzhi
 *
 */
@Entity
@Table(name="stock_classattr")
public class ClassAttribute extends BaseEntity{

	private static final long serialVersionUID = 1L;

	@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	
	private String name;
	
	@ManyToOne
	private ProductClass productClass;
	

	
	@ManyToOne
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private FieldUI ui;
	
	private String type;
	
	private Boolean notNull;
	
	
	private Boolean gridShow;

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getId() {
		return id;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setProductClass(ProductClass productClass) {
		this.productClass = productClass;
	}

	public ProductClass getProductClass() {
		return productClass;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getType() {
		return type;
	}

	public void setNotNull(boolean notNull) {
		this.notNull = notNull;
	}

	public boolean isNotNull() {
		return notNull;
	}


	public void setUi(FieldUI ui) {
		this.ui = ui;
	}

	public FieldUI getUi() {
		return ui;
	}

	public void setGridShow(boolean gridShow) {
		this.gridShow = gridShow;
	}

	public boolean isGridShow() {
		return gridShow;
	}


	

	
}
